<{include file="header.html"}>
<script type="text/javascript">
function validate()
{
	var member = document.getElementById("member");
	if(member.value == 0){
		showErrorBubble(member, '<{$smarty.const._MSG_INVALID_MEMBER_BOOKING|utf8_escape_js}>');
		return false;
	}
	document.booking_form.submit();
	return true;
}
function displayReason(rd){
	if(rd.value == 1){
		document.getElementById("REASON").style.display = "none";
	}
	else{
		document.getElementById("REASON").style.display = "block";
	}
}
</script>
	<div class="box_home">
        <div class="box_content">
		<p style="text-align: left;font-weight: bold;text-decoration: underline;"><{$smarty.const._LB_BOOKING_DETAIL_INFO|utf8_escape_html}> : </p>
			<form action="<{$smarty.server.REQUEST_URI}>" enctype='multipart/form-data' method="post" name="booking_form">
				<input type="hidden" id="act" name="act" value="<{$smarty.const.ACT_VALID_EDIT}>"/>
				<table width="100%">
					<tr>
						<td><{$smarty.const._LB_MEMBER|utf8_escape_html}>&nbsp;:&nbsp;</td>
						<td>
							<select id="member" name="member">
								<option value="">--Select One--</option>
							<{while $members->fetch()}>
							<option value="<{$members->ID}>" ><{$members->FIRST_NAME}> <{$members->LAST_NAME}> ( <{$members->EMAIL}> )</option>
							<{/while}>
							</select>
							
						</td>
						<td></td>
					</tr>
					<{foreach from=$booked key=ind item=bookingData}>
					<tr style="font-weight: bold;">
						<td width="100"><{$smarty.const._LB_BOOKING_DATE|utf8_escape_html}>&nbsp;:&nbsp;</td>
						<td>
							<{$bookingData.bookingDate|date_format:"%d/%m/%Y %H:%M"}>
							<input type="hidden" id="DATE" name="DATE" value="<{$bDATE|date_format:"%d/%m/%Y"}>" />
							<input type="hidden" id="TIME" name="TIME" value="<{$bTIME}>" />
						</td>
						<td style="width:100px;">
							<a href="<{$smarty.const.APPLICATION_URL}>/booking/form/?sesID=<{$ind}>"><{$smarty.const._LB_ADJUST}></a>
							<a onclick="return confirm('<{$smarty.const._MSG_BOOKING_DELETE_CONFIRM|utf8_escape_html}>')"  href="<{$smarty.const.APPLICATION_URL}>/booking/preview/?sesID=<{$ind}>&act=<{$smarty.const.ACT_DELETE}>"><{$smarty.const._LB_DELETE}></a>
						</td>
					</tr>
					<tr>
						<td><{$smarty.const._LB_SERVICE|utf8_escape_html}>&nbsp;:&nbsp;</td>
						<td>
							<{foreach from=$bookingData.services item=service}>
							<{$service.TITLE|utf8_escape_html}> (<{$service.TIME|utf8_escape_html}> mins - $<{$service.PRICE|utf8_escape_html}>) <br />
							<input type="hidden" id="SERVICE" name="SERVICE[]" value="<{$services->ID}>" />
							<{/foreach}>
						</td>
						<td></td>
					</tr>
					<{/foreach}>
					<tr>
						<td colspan="3" style="padding-top: 10px;text-align: center">
							<input class="btn" value="<{$smarty.const._LB_BOOK_MORE}>" onclick="javascript:location.href='<{$smarty.const.APPLICATION_URL}>/booking/form/'" id="btnBookMore" type="button"/>
							<{if $booked|@count > 0}>
							<input class="btn" value="Submit" id="btnSubmit" type="button" onclick="validate()"/>
							<{/if}>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
<{include file="footer.html"}>